package com.wkk.log.dto;

import com.wkk.verification.RegularConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;


/**
 * @author : WangKeKe
 * @date : 2020/9/29 14:12
 * Description : 用于日志的条件查询
 */

@Data
@Accessors(chain = true)
@ApiModel(description = "用于日志的条件查询")
public class LogQueryDto {

    @ApiModelProperty(value = "操作者用户名")
    private String usernameKeyword;

    @ApiModelProperty(value = "操作是否成功 true:false")
    private String status;

    @ApiModelProperty(value = "操作耗时最小值")
    @Min(value = 0, message = "操作耗时最小值不能小于0")
    private Integer minTime;

    @ApiModelProperty(value = "操作耗时最大值")
    @Min(value = 0, message = "操作耗时最大值不能小于0")
    private Integer maxTime;

    @ApiModelProperty(value = "操作关键字")
    private String operationKeyword;

    @ApiModelProperty(value = "大于该时间")
    @Pattern(regexp = RegularConstant.TIME_EASY, message = "开始时间不符合时间格式")
    private String startDatetime;

    @ApiModelProperty(value = "小于该时间")
    @Pattern(regexp = RegularConstant.TIME_EASY, message = "结束时间不符合时间格式")
    private String endDatetime;

}
